From a233e8de878672f54f7d6c090460693cd62f5062 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sat, 13 May 2023 13:03:26 +0200 Subject: [PATCH] fixdep: Allow overriding HOSTCC and HOSTLD Forwarded: not-needed objtool always uses HOSTCC, HOSTLD, and HOSTAR, so we need to override these on the command line for cross-builds of linux-kbuild. But it also builds fixdep which still needs to be native in a cross-build. Add support for REALHOSTCC and REALHOSTLD variables which, if set, override HOSTCC and HOSTLD for fixdep only. Gbp-Pq: Topic debian Gbp-Pq: Name fixdep-allow-overriding-hostcc-and-hostld.patch --- tools/build/Makefile.include | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/build/Makefile.include b/tools/build/Makefile.include index 52c802a389c..b9d7d1aec6f 100644 --- a/tools/build/Makefile.include +++ b/tools/build/Makefile.include @@ -2,7 +2,10 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj fixdep: - $(Q)$(MAKE) -C $(srctree)/tools/build $(OUTPUT)fixdep + $(Q)$(MAKE) -C $(srctree)/tools/build \ + $(if $(REALHOSTCC),HOSTCC=$(REALHOSTCC) HOSTCFLAGS=) \ + $(if $(REALHOSTLD),HOSTLD=$(REALHOSTLD) KBUILD_HOSTLDFLAGS=) \ + $(OUTPUT)fixdep fixdep-clean: $(Q)$(MAKE) -C $(srctree)/tools/build clean -- 2.30.2